@emad-r said in Automatically Add New Vultr Fedora Minion to Salt Master:
@scottalanmiller said in Automatically Add New Vultr Fedora Minion to Salt Master:
If you are using Vultr as your VPS or Cloud Computing IaaS platform, then you have some simple tools to make automating a Salt Minion installation even easier. Vultr allows for "boot scripts" which run upon initial VM creation, along with their automatically installed system keys. Adding a tiny script can make all of the difference between needing to set up a new VM and having the entire process be totally automated.
Here is an example script that you can use. Notice that this is for Fedora and uses DNF. You will need a similar script for APT, YUM or other package management systems.
#!/bin/sh dnf -y install salt-minion echo "master: you.salt.master" >> /etc/salt/minion systemctl restart salt-minion systemctl enable salt-minionThat's all that it takes. Select the script when building your VM(s) and look for them to auto-populate in your Salt Master's key request list.
But what will be the ID/name of this Fedora instance in salt master ?
LOL, I got confused. Was thinking we were on Sodium, not salt.
It'll be your hostname.